Skip to main content

NPI Matching Logic

The stored procedure spGetNPIPersonDupeRecords__c in the Aptify Database is used to find duplicate records based on various matching criteria such as NPI number, name, address, and license details.

Steps

  1. Initialize Variables:

    • Set up temporary storage for results.
    • Prepare input parameters by trimming whitespace and ensuring they are not null.
  2. Matching Process:

MatchTypeLogic Description
Awesomely PerfectMatch by First Name, Last Name, NPI Number or NCSBN ID. If all fields match with a person’s record, it’s considered a perfect match.
Awesomely PerfectIf no match found by NP or NCSBN ID, then match by First Name, Last Name, License Number, and License State. If all four fields match, it’s considered a perfect match.
Very Close MatchIf no perfect match is found, then match by First Name, Last Name, Address Line 1, City, and State against the best address. If all fields match, it’s a very close match.
Very Close MatchIf no match is found in the best address, then match by First Name, Last Name, Address Line 1, City, and State against the person’s business address.
Close MatchIf no very close match is found, then match by First Name, Last Name, City, and State against the best address. If all fields match, it’s a close match.
No MatchIf no match is found, the record is flagged as unmatched. The record will be imported into the NP Demographics database as a new person.
  1. Output:

    • The procedure outputs all the found matches along with their match types.
  2. Clean Up:

    • Drops the temporary storage to clean up.